{extends file="./main.tpl"}
{block name=head}

<style type="text/css" title="currentStyle">
  @import "./media/css/demo_page.css";
  @import "./media/css/demo_table_jui.css";
  @import "./media/css/jquery-ui-1.8.4.custom.css";
</style>
<script type="text/javascript" language="javascript" src="./media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="./media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() 
  {
	  oTable = $('#example').dataTable(
	  {
		  "bJQueryUI": true,
		  "sPaginationType": "full_numbers",
		  "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
		  
	  });
  });
</script>
<script type= text/javascript>
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<form name="branch" action="{$smarty.server.PHP_SELF}" method="post">
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="4"><b>Create Users</b></td>
</tr>
<tr>
  <td class="table2" align="left">User Name :</td>
  <td class="table2"><input type="text" name="userName" required autofocus /></td>
</tr>
<tr>
  <td class="table2" align="left">Password:</td>
  <td class="table2"><input type="Password" name="password" required /></td>
</tr>
<tr>
  <td class="table2" align="left">Retype Password:</td>
  <td class="table2"><input type="Password" name="password" required /></td>
</tr>
<tr>
	<td class="table2" align="left">Branch : </td>
	<td class="table2">
		<select name="branchId">
			{html_options values=$branchSubArray.branchId output=$branchSubArray.branchName}
  	</select>
	</td>
</tr>
<tr>
	<td class="table2" align="left">User Type :</td>
	<td class="table2" align="left">
		<option value="0"></option>
		<select name="userType" >Selct User Type
		  {html_options values=$userArrayVal output=$userArrayOutput}
	  </select>
	</td>
</tr>
<tr>
	<td  align="center" class="table1" colspan="4"><input type="submit" value="Submit" name="submit" class="button"></td>
</tr>
</table>
</form>
<br /><br />
<body id="dt_example">
	<div id="container">
  <div class="demo_jui">
	  <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
		  <thead>
			  <tr>
				  <th NOWRAP><b>Delete</b></th>
					<th NOWRAP><b>User Name</b></th>
					<th NOWRAP><b>Password</b></th>
					<th NOWRAP><b>User Type</b></th>
					<th NOWRAP><b>Branch</b></th>
				</tr>
			</thead>
			<tbody>
			  {section name="sec" loop=$branchArray}
					<tr>
					  <td align="left"><a href="userDelete.php?userId={$branchArray[sec].userId}" onclick="return myFunction();" class="link"> <img src="images/deleteIco.png"></a></td>
					  <td align="left">{$branchArray[sec].userName}</td>
					  <td align="left">{$branchArray[sec].password}</td>
					  <td align="left">{$branchArray[sec].userType}</td>
					  <td align="left">{$branchArray[sec].branchName}</td>
					</tr>
				{/section}
			</tbody>
		</table>
	</div>
	<div class="spacer"></div>
	</div>
</body>
{/block}